Page({
  data: {
    id: '',
    point: '',
    building: '',
    room: '',
    name: '',
    gender: '',
    mobile: '',
    idcardFrontUrl: '',
    idcardBackUrl: '',
    status: 0,
  },

  editHouse() {
    wx.navigateTo({
      url: `/house_pkg/pages/form/index?id=${this.data.id}`,
    })
  },
  async onLoad({
    id
  }) {
    const {
      data
    } = await wx.http.get(`/room/${id}`)
    this.setData({
      id: data.id,
      point: data.point,
      building: data.building,
      room: data.room,
      name: data.name,
      gender: data.gender,
      mobile: data.mobile,
      idcardFrontUrl: data.idcardFrontUrl,
      idcardBackUrl: data.idcardBackUrl,
      status: data.status
    })
  }
})